package com.situ.blog.service.impl;

import com.situ.blog.dao.IBlogDao;
import com.situ.blog.dao.impl.BlogDaoImpl;
import com.situ.blog.pojo.entity.Blog;
import com.situ.blog.pojo.query.BlogQuery;
import com.situ.blog.service.IBlogService;

import java.util.List;

public class BlogServiceImpl implements IBlogService {
    private IBlogDao blogDao = new BlogDaoImpl();

    @Override
    public List<Blog> selectSearch(BlogQuery blogQuery) {
        return blogDao.selectSearch(blogQuery);
    }

    @Override
    public Blog selectById(int id) {
        return blogDao.selectById(id);
    }

    //两个单独条件搜索,不用Query封装
    /*@Override
    public List<Blog> selectSearch(Integer typeId, String name) {
        return blogDao.selectSearch(typeId,name);
    }*/

      //单条件搜索
//    @Override
//    public List<Blog> selectSearch(Integer typeId) {
//        return blogDao.selectByType(typeId);
//    }
}
